/*
 * Cache.c
 *
 *  Created on: 13.11.2011
 *      Author: Matthias
 */


#include "Cache.h"

void writeToDataCache(int line, int value) {
	cache[line] |= (value & 0x00FF);
}
int readDataCache(int line) {
	return (cache[line] & 0x00FF);
}
void writeToInstructionCache(int line, int value) {
	cache[line] |= ((value << 8) & 0xFF00);
}
int readInstructionCache(int line) {
	return ((cache[line] & 0xFF00) >> 8);
}
